package cn.script.game.dup;

import cn.script.call_api.AfterApi;
import cn.script.call_api.BeforeApi;
import cn.script.game.GameOpt;
import cn.script.game.prof.Pi;
import cn.script.util.Delay;

public class ZsDup extends AbstractDup {

    public ZsDup(Pi pi, GameOpt gameOpt) {
        super("众神劫神殿救赎", pi, gameOpt);
    }

    @Override
    protected BeforeApi beFore() {
        return () -> {
            this.go.toBack();
            this.go.wio().keypress("f11",500);
            this.go.moveTo("凌霄城").winPoint(449,333)
                    .gamePoint(239,191).rPoint(2,2).opt();
            this.go.npc("众神的亡灵");
            this.go.text_click("免门票");
////            this.go.text_click("要塞副本");
            this.go.wio().keypress("f10",500);
            Delay.delay(1000);
            return 1;
        };
    }

    @Override
    public DupInfo dupInfo() {
        DupInfo dupInfo = new DupInfo(this.go, this.optName);
        // 1: 364,390  127,145  众神劫牛魔王(首领)
        dupInfo.dupOpt("众神劫牛魔王(首领)")
                .a_skills(this.pi.skills())
                .m_winPoint(364, 390)
                .m_gamePoint(127,145)
                .m_rPoint(8,8)
                .a_endNum(3)
                .a_timeOut(30000);
        // 2: 269,345 80,147 众神劫傀儡王(首领)
        dupInfo.dupOpt("众神劫傀儡王(首领)")
                .a_skills(this.pi.skills())
                .m_winPoint(269,345)
                .m_gamePoint(80,147)
                .m_rPoint(8,8)
                .a_endNum(3)
                .a_timeOut(30000);
        // 3: 421,453 72,63 众神劫大将军(首领)
        dupInfo.dupOpt("众神劫大将军(首领)")
                .a_skills(this.pi.skills())
                .m_winPoint(416,255)
                .m_gamePoint(71,65)
                .m_rPoint(8,8)
                .a_endNum(3)
                .a_timeOut(30000);
        return dupInfo;
    }

    @Override
    protected AfterApi after() {
        return ()->{
//            this.go.toBack();
//            Delay.delay(5000);
            return 1;
        };
    }
}
